package de.dnb.basics.filtering;

import de.dnb.basics.applicationComponents.RangeCheckUtils;

/**
 * Filterkriterium GRÖSSER basierend auf Comparable.
 * 
 * @author Michael Inden
 * 
 * Copyright 2011 by Michael Inden 
 */
public class Greater<T extends Object & Comparable<T>> implements
	IPredicate<T> {
	private final T lowerBound;

	public Greater(final T lowerBound) {
		RangeCheckUtils.assertReferenceParamNotNull("lowerBound",
			lowerBound);

		this.lowerBound = lowerBound;
	}

	@Override
	public final boolean accept(final T object) {
		return lowerBound.compareTo(object) < 0;
	}
}
